package com.woniu.market_stall.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniu.market_stall.mapper.StallAuctionMapper;
import com.woniu.market_stall.result.ResultResponse;
import com.woniu.market_stall.vo.StallAuctionDetailVo;
import com.woniu.market_stall.vo.StallVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
public class AuctionDetailService {

    @Autowired
    StallAuctionMapper stallAuctionMapper;


    /**
     * 按照条件查询竞拍明细
     * @param now 当前页面
     * @param size 页面大小
     * @param username 摊位名字
     * @return 返回一个PageInfo
     */
    public PageInfo<StallAuctionDetailVo> queryAuctionDetailByUsername(Integer now , Integer size , String username , int stallId){
        PageHelper.startPage(now , size);
        List<StallAuctionDetailVo> list = stallAuctionMapper.selectAuctionDetailByUsername(username , stallId);
        return new PageInfo<>(list);
    }



}
